/*
 * This file is part of pocketfft.
 * Licensed under a 3-clause BSD style license - see LICENSE.md
 */

/*! \file pocketfft.h
 *  Public interface of the pocketfft library
 *
 *  Copyright (C) 2008-2018 Max-Planck-Society
 *  \author Martin Reinecke

 https://forums.developer.nvidia.com/t/problem-with-typedef-struct-in-header-file-error-invalid-redeclaration-of-type-nam/4666/2
 */
#pragma once 

#ifdef __cplusplus
extern "C" {

#endif

#include <stdlib.h>
struct cfft_plan_i;

// extract these definition into the head files 
// , in order to utilize the judge procedure of plan
typedef struct cfftp_plan_i * cfftp_plan;
typedef struct fftblue_plan_i * fftblue_plan;
typedef struct cfft_plan_i
{
    cfftp_plan packplan;
    fftblue_plan blueplan;
} cfft_plan_i;

typedef struct cfft_plan_i * cfft_plan;
cfft_plan make_cfft_plan (size_t length);
void destroy_cfft_plan (cfft_plan plan);
int cfft_backward(cfft_plan plan, float c[], float fct);
int cfft_forward(cfft_plan plan, float c[], float fct);
size_t cfft_length(cfft_plan plan);

#ifdef __cplusplus
}
#endif